package com.hue.springbootcache.service;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class IndexService {

    @Cacheable(value = "test1",key = "#root.method.name")
    public String test(){
        System.out.println("查询数据库...");
        return "hello";
    }

}
